package spring.AOP.xml;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * <p>类描述：。</p>
 *
 * @author 贾亮
 * @version v1.0.0.1。
 * @since JDK1.8。
 * <p>创建日期：2018/3/8 9:24。</p>
 */
public class Main {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring/AOPxml.xml");
//        SumImpl sumImpl = (SumImpl) applicationContext.getBean("sumImpl");
//        int result = sumImpl.div(1, 1);
//        Sum sum = (Sum) applicationContext.getBean("sumImpl");
        Sum sum = applicationContext.getBean(Sum.class);
        int result = sum.div(1, 1);
    }
}
